<template>
    <div>
        <table class="mb-tb" style="width: 100%">
            <tr>
                <td class="mb-blue">求助标题</td>
                <td >{{formData.helpTitle}}</td>
                <td class="mb-blue">捐赠类型</td>
                <td >{{typeName}}</td>
            </tr>
            <tr>
                <td class="mb-blue">捐赠人</td>
                <td >{{formData.donatorUserName}}</td>
                <td class="mb-blue">审核结果</td>
                <td>{{auditResultName}}</td>
            </tr>
            <tr>
                <td class="mb-blue">捐赠内容详情</td>
                <td colspan="3">{{formData.content}}</td>
            </tr>
        </table>
    </div>
</template>

<script>
    import Base from '@/components/table/BaseView';
    import dictUtils from '@/common/dictUtils';
    export default {
        name: "MyView",
        extends:Base,
        data(){
          return {
              auditResultName:"",
              typeName:""
          }
        },
        methods:{
            loadDataById(id){
                if(id!=null){
                    this.load("/api/donate/readByMap",{id},()=>{
                        dictUtils.getDictName("audit_type",this.formData.auditResult).then((res)=>{
                            this.auditResultName=res;
                        });
                        dictUtils.getDictName("donate_type",this.formData.type).then((res)=>{
                            this.typeName=res;
                        });
                    })
                }else{
                   this.formData={}
                }
            }
        }

    }
</script>
<style src="@/assets/css/TableView.css" scoped></style>
<style scoped >
    .mb-tb td:nth-of-type(odd){width: 10%;}
    .mb-tb td:nth-of-type(even){width: 40%}
</style>
